#!/bin/sh

SSID=$(uci -q get wireless.@wifi-iface[0].ssid)
KEY=$(uci -q get wireless.@wifi-iface[0].key)
IPADDR=$(uci -q get network.lan.ipaddr)
NETMASK=$(uci -q get network.lan.netmask)

uci set wizard.default=wizard
uci set wizard.default.wifi_ssid="$SSID"
uci set wizard.default.wifi_key="$KEY"
uci set wizard.default.lan_ipaddr="$IPADDR"
uci set wizard.default.lan_netmask="$NETMASK"

uci commit wizard

exit 0
